import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-profile-panel',
  templateUrl: './profile-panel.component.html',
  styleUrls: ['./profile-panel.component.less']
})
export class ProfilePanelComponent implements OnInit {

  public timestamp = new Date();

  constructor() { }

  ngOnInit() {
    setInterval(() => {
      // 此处为需要定时执行的方法，2000为间隔的时间，单位是毫秒
      this.timestamp = new Date();
    }, 2000);
  }

}
